HADOOP-19197. S3A: Support AWS KMS Encryption Context #7193
+513
−29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add the property fs.s3a.encryption.context that allow users to specify the AWS KMS Encryption Context to be used in S3A.
The value of the encryption context is a key/value string that will be Base64 encoded and set in the parameter ssekmsEncryptionContext from the S3 client.
Contributed by Raphael Azzolini
Description of PR
This code change adds a new property to S3A: fs.s3a.encryption.context\
The property's value accepts a set of key/value attributes to be set on S3's encryption context. The value of the property will be base64 encoded and set in the parameter ssekmsEncryptionContext from the S3 client.
This change was merged to trunk by the pull request #6874. This request is to merge the code change to branch-3.4.
How was this patch tested?
Tested in us-west-1 with
mvn -Dparallel-tests -DtestsThreadCount=16 clean verify
I added a new test
ITestS3AEncryptionSSEKMSWithEncryptionContext
.I added this property to
auth-keys.xml
Then I executed the following tests:
I also executed the test with the following statement in my KMS key:
When using that statement, tests without encryption context fail, and the new test will pass only if the given key-pair is set in
fs.s3a.encryption.context
.For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?